The present disclosure relates to image processing apparatus and method, and a program, particularly, image processing apparatus and method, and a program which makes it possible to implement segmentation with high accuracy.
Separating an object image (object image or foreground image) in an image from the background image is useful for many applications, such as image editing or video processing.
In many methods, an object image is separated from the background image, with the color information of an image as a clue.
The color information is used to calculate likelihood that is obtained from a model corresponding to the color of a pixel by calculating a probability model by using the colors of the pixels of all of the image or a designated portion. The color of the object or the color of the background for calculating the probability model is designated by preprocess, such as marking some pixels of the object or the background area image by a user or by executing a predetermined software program.
It is possible to separate an object from a likelihood difference based on the difference in color distribution state of the background image or the object image, in a simple image.
The color distribution is complicated in a more general image and an unclear separation result of the object image and the background image is obtained in likelihood determined by the color distribution of the entire image, in many cases.
A method of improving the color separation may be considered by not globally obtaining the color distribution model, using the colors of the entire image, but locally obtaining to be changed for each image region.
As one method of calculating a local color model, a method of disposing a small window group on the border of the object expected from movement by using a small change due to movement of an object with continuous images of a video, calculating the color distribution model in the small window group, and performing separation optimization calculation of the object image and the background image has been proposed (see U.S. Pat. No. 7,609,888, titled “separating a video object from a background of a video sequence”).
As a color distribution model, there is a method of calculating and using a five-dimensional probability model including the XY-image space position, in addition to three dimensions of RGB, using Gaussian Mixture Model (GMM) (see US2007/0237393, titled “image segmentation using spatial-color Gaussian mixture models”).